import { ArrowLeftOutlined } from '@ant-design/icons'
import { Button, Space } from 'antd'
import { useHistory } from 'react-router'

const DetailHeader = ({
  title,
  extra
}) => {
  const history = useHistory()
  return <div className="page-head">
    <Space>
      <Button
        onClick={() => history.goBack()}
      >
        <ArrowLeftOutlined />
      </Button>
      {title}
    </Space>
    {extra}
  </div>
}

export default DetailHeader